{extends file="./main.tpl"}
{block name=head}
<style type="text/css" title="currentStyle">
  @import "./media/css/demo_page.css";
  @import "./media/css/demo_table_jui.css";
  @import "./media/css/jquery-ui-1.8.4.custom.css";
</style>
<script type="text/javascript" language="javascript" src="./media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="./media/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
  $(document).ready(function() 
  {
	  oTable = $('#example').dataTable(
	  {
		  "bJQueryUI": true,
		  "sPaginationType": "full_numbers",
		  "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]
	  });
  });
</script>
<script type="text/javascript">
$(document).ready(function() {
	$(".add").blur(function()
	{
	  if($(".add:last").val() != '' && $(".add:last").val() > 0)
	  {
      $("#one").clone(true).appendTo("#mainDiv")
      .find('input[type="text"]').val('').end()
      .find('select[option=""]').val('');
    }
  });
});
function myFunction()
{
  if(confirm("You Want To Remove This Record")== true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
</script>
{/block}
{block name=body}
<form name="branch" action="{$smarty.server.PHP_SELF}" method="post">
<table align="center" border="2" cellpadding="2" cellspacing="2" width="" >
<tr>
  <td align="center" class="table1" colspan="6"><b>Branch</b></td>
</tr>
<tr>
  <td class="table2" align="center">Branch Name :<input type="text" name="branch" required autofocus /></td>
</tr>
<tr>
	<td class="table2" align="center">Branch Company :<input type="text" name="branchCompany" /></td>
</tr>
<tr>
	<td class="table2" align="center">Licence No :<input type="text" name="licenceNo" /></td>
</tr>
	<td  align="center" class="table1"><input type="submit" value="Submit" name="submit" class="button"></td>
</tr>
</table>
</form>
<br /><br />
<body id="dt_example">
	<div id="container">
  <div class="demo_jui">
	  <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
		  <thead>
			  <tr>
				  <th NOWRAP><b>&nbsp;</b></th>
					<th NOWRAP><b>Branch Name</b></th>
					<th NOWRAP><b>Branch Company Name</b></th>
					<th NOWRAP><b>Licence No</b></th>
				</tr>
			</thead>
			<tbody>
			  {section name="sec" loop=$branchArray}
					<tr>
					  <td align="center"><a href="brachDelete.php?branchId={$branchArray[sec].branchId}" onclick="return myFunction();" class="link"> <img src="./images/deleteIco.png"></a></td>
					  <td align="left">{$branchArray[sec].branchName}</td>
					  <td align="left">{$branchArray[sec].branchCompany}</td>
					  <td align="left">{$branchArray[sec].licenceNo}</td>
					</tr>
				{/section}
			</tbody>
		</table>
	</div>
	<div class="spacer"></div>
	</div>
</body>
{/block}